using System;
using OpenTK.Mathematics;
using OpenTK.Windowing.Common;
using OpenTK.Windowing.Common.Input;
using OpenTK.Windowing.GraphicsLibraryFramework;

namespace OpenTK.Windowing.Desktop
{
	public class NativeWindowSettings
	{
		public static readonly NativeWindowSettings Default = new NativeWindowSettings();

		public IGLFWGraphicsContext SharedContext { get; set; }

		public WindowIcon Icon { get; set; }

		public bool IsEventDriven { get; set; }

		public ContextAPI API { get; set; } = ContextAPI.OpenGL;


		public ContextProfile Profile { get; set; } = ContextProfile.Core;


		public ContextFlags Flags { get; set; } = ContextFlags.ForwardCompatible;


		public bool AutoLoadBindings { get; set; } = true;


		public Version APIVersion { get; set; } = new Version(3, 3);


		public MonitorHandle CurrentMonitor { get; set; }

		public string Title { get; set; } = "OpenTK Window";


		public bool StartFocused { get; set; } = true;


		public bool StartVisible { get; set; } = true;


		public WindowState WindowState { get; set; }

		public WindowBorder WindowBorder { get; set; }

		public Vector2i? Location { get; set; }

		public Vector2i Size { get; set; } = new Vector2i(640, 360);


		public Vector2i? MinimumSize { get; set; }

		public Vector2i? MaximumSize { get; set; }

		public (int numerator, int denominator)? AspectRatio { get; set; }

		[Obsolete("Use WindowState instead.", true)]
		public bool IsFullscreen { get; set; }

		public int NumberOfSamples { get; set; }

		public int? StencilBits { get; set; }

		public int? DepthBits { get; set; }

		public int? RedBits { get; set; }

		public int? GreenBits { get; set; }

		public int? BlueBits { get; set; }

		public int? AlphaBits { get; set; }

		public bool SrgbCapable { get; set; }

		public bool? TransparentFramebuffer { get; set; }

		public VSyncMode Vsync { get; set; }

		public unsafe NativeWindowSettings()
		{
			GLFWProvider.EnsureInitialized();
			CurrentMonitor = new MonitorHandle((IntPtr)GLFW.GetPrimaryMonitor());
		}
	}
}
